#extension GL_OES_EGL_image_external : require
precision mediump float;
varying vec2 textureCoordinate;
uniform samplerExternalOES s_texture;
void main() {
    vec4 rgba = texture2D(s_texture, textureCoordinate);
    float color = (rgba.r + rgba.g + rgba.b) / 3.0;
    gl_FragColor = vec4(color,color,color,rgba.a);
}